home *** CD-ROM | disk | FTP | other *** search
- #
- # submission.make
- # Copyright (C) 1995 Stephan Wacker
- # 94-12-25
- #
- # Targets:
- # bin_submission - precompiled fat binary
- # src_submission - program sources
- # submission - all of the above
- #
- # Put this line into your Makefile.preamble:
- # LOCALMAKEDIR = /LocalDeveloper/Makefiles
- #
- # And this goes to the end of Makefile.postamble:
- # -include $(LOCALMAKEDIR)/submission.make
- # -include ./submission.make
- #
- # Inputs from Makefile.preamble:
- # SUBMIT_NAME - basename of archive, usually ``$(NAME)''
- # VERSION - version number of this submission, e.g. ``1.1''
- # SUBMIT_ARCHS - architectures included in the binary submission,
- # e.g. ``$(TARGET_ARCHS)'' or ``m68k i386''
- # SUBMIT_FILES - files to be added to the main submission directory,
- # e.g. ``README.rtf INSTALL.rtfd''
- # SUBMIT_SRC_FILES - like SUBMIT_FILES but only for a source submission
- # SUBMIT_BIN_FILES - like SUBMIT_FILES but only for a binary submission
- #
-
- TMPDIR = /tmp/$(SUBMIT_NAME)
-
- ARCHITECTURE = `echo $(SUBMIT_ARCHS) | \
- sed -e s/m68k/N/ -e s/i386/I/ \
- -e s/hppa/H/ -e s/sparc/S/ -e 's/ //g'`
-
- ARCHIVERS = tar.gz
- GZIP = /usr/bin/gzip -9
-
- #
- # The submission name is formed according to the conventions of
- # the Peanuts archive at the University of Munich:
- # ftp://ftp.informatik.uni-muenchen.de/pub/comp/platforms/next/submissions
- #
- SUBMIT_BIN_ARCHIVE = $(SUBMIT_NAME).$(VERSION).$(ARCHITECTURE).b.$(ARCHIVERS)
- SUBMIT_SRC_ARCHIVE = $(SUBMIT_NAME).$(VERSION).s.$(ARCHIVERS)
-
-
- #
- # Use any of these targets:
- #
- submission: bin_submission src_submission
- bin_submission: $(SUBMIT_BIN_ARCHIVE)
- src_submission: $(SUBMIT_SRC_ARCHIVE)
-
-
- #
- # A binary submission is like a compressed installation.
- # Here we compile for all architectures specified in SUBMIT_ARCHS.
- #
- $(SUBMIT_BIN_ARCHIVE): $(SRCFILES) $(SUBMIT_FILES)
- $(RM) -rf $(TMPDIR)
- $(RM) -rf $(SYMROOT)/$(NAME).app
- $(MAKE) install "INSTALLDIR=$(TMPDIR)" "TARGET_ARCHS=$(SUBMIT_ARCHS)"
- $(CP) -R $(SUBMIT_FILES) $(SUBMIT_BIN_FILES) $(TMPDIR)
- ( (cd $(TMPDIR)/.. ; $(TAR) chf - $(SUBMIT_NAME) ) | $(GZIP) -c > $@ )
- $(RM) -rf $(TMPDIR)
-
- #
- # A source submission is like a compressed copy.
- #
- $(SUBMIT_SRC_ARCHIVE): $(SRCFILES) $(SUBMIT_FILES)
- $(RM) -rf $(TMPDIR)
- $(MAKE) copy "DEST=$(TMPDIR)/$(NAME)-$(VERSION)"
- $(CP) -R $(SUBMIT_FILES) $(SUBMIT_SRC_FILES) $(LOCALMAKEDIR) $(TMPDIR)
- ( (cd $(TMPDIR)/.. ; $(TAR) chf - $(SUBMIT_NAME) ) | $(GZIP) -c > $@ )
- $(RM) -rf $(TMPDIR)
-